fix: mask PIB after service labels and log noise (v2.6.7)#40
Merged
Conversation
…6.7) In 'ПІБ: Петренко...' and data-ipn log lines the real name was skipped: the PIB anchor latched onto 'ІПН=NNNN' (uppercase start) or the marker 'ПІБ', then stopped before the actual name. is_pib_anchor now strips trailing punctuation and rejects tokens with digits/'='; 'ПІБ'/'звання' are excluded markers. +3 tests. Bare rank without PIB still unmasked (documented known limitation). https://claude.ai/code/session_01XT6iUWaQgahXDB9TWX9Bq7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PIB after service labels / log noise was not masked
In lines like
ПІБ: Петренко Іван Васильовичordata-ipnlog lines… ІПН=3698521592 — ПІБ «138» → «Міронов Андрій Петрович» …, the real name was skipped. The PIB anchor latched onto the first uppercase token —ІПН=3698521592— and stopped, or onto the markerПІБ, never reaching the actual name after→.Fix
is_pib_anchorstrips trailing punctuation (soПІБ:matches the exclude list) and rejects tokens containing digits or=(soІПН=…,«138»are not treated as names).ПІБ/званняadded as excluded service markers.Now both the log format and the common
ПІБ: …/звання: …document formats mask correctly; IPNs still masked; roundtrip verified.Known limitation (documented)
A bare rank with no following PIB (
звання «…» → «молодший сержант») is still not masked — long-standing behavior avoiding false positives on rank words in prose, independent of this change.Test plan
ПІБ:label, data-ipn log roundtrip,ІПН=not-an-anchor)https://claude.ai/code/session_01XT6iUWaQgahXDB9TWX9Bq7
Generated by Claude Code